﻿using SuperFrame.Charts.SeriesParts;
using System.Windows;
using System.Windows.Data;
using System.Windows.Media;



namespace SuperFrame.Charts
{
    /// <summary>
    /// Fill Based Series Such as Area,Scatter and Column Series
    /// </summary>
    public class  BaseFillSeries : BaseLineSeries
    {
        public Brush Fill
        {
            get { return (Brush)GetValue(FillProperty); }
            set { SetValue(FillProperty, value); }
        }
        public static readonly DependencyProperty FillProperty = DependencyProperty.Register("Fill", typeof(Brush), typeof(BaseFillSeries), new PropertyMetadata(null));


        protected override void SetBindingForStrokeandStrokeThickness(BaseSeriesPart part)
        {           
            Binding fillBinding = new Binding();
            fillBinding.Path = new PropertyPath("Fill");
            fillBinding.Source = this;
            part.SetBinding(BaseFillPart.FillProperty, fillBinding);
            base.SetBindingForStrokeandStrokeThickness(part);
        }
    }
}
